def resolution(row):
    return_num = [0]
    for j, k in zip(row[0:-1], row[1:]):
        return_num.append(j + k)
    return_num.append(0)
    return return_num


def output(num_list):
    if num <= 5:
        for i in range(num):
            s = " " * (num - i - 1)
            for j in row_list[i][1:-1]:
                s = s + str(j) + " "
            print(s)
    elif 6 <= num <= 9:
        for i in range(num):
            s = "   "+"  " * (num - i - 1)
            for j in row_list[i]:
                if j >= 10:
                    s = s + str(j) + "  "
                elif 0 < j < 10:
                    s = s + " " + str(j) + "  "
            print(s)
    elif num >= 10:
        for i in range(num):
            s = "     " + "   " * (num - i - 1)
            for j in row_list[i]:
                if j >= 100:
                    s = s + str(j) + "   "
                elif 10 <= j < 100:
                    s = s + " " + str(j) + "   "
                elif 0 < j < 10:
                    s = s + "  " + str(j) + "   "
            print(s)


if __name__ == "__main__":
    row_list = []
    num = eval(input(""))

    row_num = [0, 1, 0]
    row_list.append(row_num)

    for count in range(num):
        row_num = resolution(row_num)
        row_list.append(row_num)

    output(row_list)
